<extend name="Common/base"/>
<block name="js">
    <script src="{$Think.JS_URL}\assetce.js"></script>
</block>
<block name="content">
    <div class="container">
        <div class="menu_l" >
            <div class="Na" style="margin-left:13px;" ><span style="word-break:normal;"></span>
            </div>
            <dl id="dl1" class="close1">
                <dt  onclick="onelist(this)" style="background-color:#019858">
                    <span><img id="img0" src="images/right.png"/>仪器借用</span>
                </dt>
                <dd ><a href="{:U('InstrumentLend/index')}" style="color:#333333;text-decoration: none;"><span>填写申请表 </span></a></dd>
                <dd style="background-color:#019858"><a href="{:U('MyAsset/index')}" style="color:#333333;text-decoration: none;"><span>我的借用记录</span></a></dd>
            </dl>
            <dl id="dl2" class="close1">
                <dt  onclick="onelist(this)"> <span><img id="img1"src="images/right.png"/>耗材领取</span></dt>
                <dd style="background-color:#019858"><a href="{:U('Material/index')}" style="color:#333333;text-decoration: none;"><span>填写申请表</span></a></dd>
                <dd><a href="{:U('MyMaterial/index')}" style="color:#333333;text-decoration: none;"><span>我的领取记录</span></a></dd>
            </dl>
            <dl id="dl3" class="close1">
                <dt  onclick="onelist(this)" style="background-color:#019858"> <span><img img id="img2" src="images/right.png"/>申购</span></dt>
                <dd ><a href="{:U('ApplicationApply/index')}" style="color:#333333;text-decoration: none;"><span>仪器设备申购</span></a></dd>
                <dd   style="background-color:#019858"><a href="{:U('MaterialApply/index')}" style="color:#333333;text-decoration: none;"><span>耗材申购</span></a></dd>
            </dl>
        </div>
        <div class="lendForm" style="width: 84%;float: right;text-align: center;">
            <div class="sousuo">
                <form class="form-inline" method="get" action="{:U('MyAsset/index')}" id="myform">
                    <!--学年选择-->
                    <select name="year" class="form-control" onchange="submitForm()" id="">
                        <if condition="$year==0">
                            <option value="0" selected>全部</option>
                            <else/><option value="0">全部</option>
                        </if>
                        <foreach name="now_term" item="v2" key="k2">
                            <option value="">{$v2.last_year}-{$v2.first_year}</option>
                        </foreach>
                    </select>
                    <!--学期选择-->
                    <select name="term" class="form-control" onchange="submitForm()">
                        <if condition="$term==2">
                            <option value="0" selected>全部</option>
                            <else/><option value="0">全部</option>
                        </if>
                        <if condition="$term==2">
                            <option value="2" selected>第一学期</option>
                            <else/><option value="2">第一学期</option>
                        </if>
                        <if condition="$year==1">
                            <option value="1" selected>第二学期</option>
                            <else/><option value="1">第二学期</option>
                        </if>
                    </select>
                    <!--归还状态选择-->
                    <select name="status" class="form-control" onchange="submitForm()" class="status">
                        <if condition="$status==0">
                            <option value="0" selected>全部</option>
                            <else/><option value="0">全部</option>
                        </if>
                        <if condition="$status==1">
                            <option value="1" selected>未归还</option>
                            <else/><option value="1">未归还</option>
                        </if>
                        <if condition="$status==2">
                            <option value="2" selected>已归还</option>
                            <else/><option value="2">已归还</option>
                        </if>
                    </select>

                    <if condition="isset($name) neq 0">
                        <input class="form-control" style="width:120px;display:inline-block" type="text" placeholder="请输入耗材名" name="search" value="{$name}">
                        <else/>
                        <input class="form-control" style="width:120px;display:inline-block" type="text" placeholder="请输入耗材名" name="search">
                    </if>
                    <button  type="submit" class="btn btn-default">
                        <i class="fa fa-search"></i>
                    </button>
                </form>
            </div>
            <div class="wList">
                <table class="table table-hover">
                    <thead>
                    <td>耗材名称</td>
                    <td>数量</td>
                    <td>领取时间</td>
                    <td>用途</td>
                    <td>归还状态</td>
                    <td>负责人</td>
                    <td>负责人电话</td>
                    <td>备注</td>
                    </thead>
                    <tbody>
                    <foreach name="material_get" item="v1" key="k1">
                        <tr>
                            <td></td>
                            <td>{$v1.count}</td>
                            <td>{$v1.create_time}</td>
                            <td>{$v1.application}</td>
                            <td>{$v1.status}</td>
                            <td></td>
                            <td></td>
                            <td>{$v1.tips}</td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
                <nav class="fenye" aria-label="Page navigation">
                    <ul class="pagination">
                        {$show}
                    </ul>

                </nav>
                <div class="fenTotal">共 {$count} 条记录</div>
            </div>

        </div>
    </div>
</block>
<block name="foot_js">
    <script>
        //表单下拉框选择直接提交数据
        function submitForm(){
            //获取form表单对象
            var form = document.getElementById("myform");


            form.submit();//form表单提交
        }

    </script>
</block>
<block name="header_js">
    <!--导航变色-->
    <script>
        var nav=document.getElementsByClassName('nav')[0].getElementsByTagName('a');
        nav[2].className='active';
    </script>
</block>